<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">


    <title>Title</title>
    <style>
        div {
            background-color: yellow;
            font-size: 16px;
        }
    </style>
</head>

<body>
   <!--<table>
        <thead>
        <tr>
            <th>姓名</th>
            <th>科目</th>
            <th>分数</th>
        </tr>
    </thead>
    <tbody align="center" border="1">
        <tr>
            <td>liumingyue1</td>
            <td>javascript</td>
            <td>100</td>
        </tr>
        <tr>
            <td>liumingyue1</td>
            <td>javascript</td>
            <td>100</td>
        </tr>
        <tr>
            <td>liumingyue1</td>
            <td>javascript</td>
            <td>100</td>
        </tr>
        </tbody>
    </table>  --> 
    <!--<button>666</button>  -->
    <!--<button>事件高级</button>
    <button>事件高级666</button>
    <div>lllooovvveee</div>  -->
   
        <!-- document.addEventListener('keypress',function() {
    console.log('按下了');
}) -->
<script>
document.addEventListener('keypress',function() {
    console.log('按下了');
})
document.addEventListener('keyup',function() {
    console.log('松开了');
})
document.addEventListener('keydown',function() {
    console.log('按下了');
})
document.addEventListener('keyup',function (e) {
    console.log('up:' + e.keyCode);
    if(e.keyCode==65){
        alert('年下了a');
    }
    else{
        alert('你没有按下');
    }
})
</script> 
</body>
</html>